package com.bz.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bz.common.PageInfo;
import com.bz.common.PageUtil;
import com.bz.entity.WorkTaskEntity;
import com.bz.service.IWorkTaskService;

@RestController
@RequestMapping(value = "/api/work-task")
public class TaskWorkController {

    @Autowired
    private IWorkTaskService workTaskService;

    /**
     * 2.2.2. 工单工艺数据删除（提供）
     * 
     * @param deviceId
     * @param orderSendBeginTime
     * @param orderSendEndTime
     * @return
     */
    @GetMapping(value = "/list")
    public PageInfo workTaskDelete(Long pageNo) {
        LambdaQueryWrapper<WorkTaskEntity> query = new LambdaQueryWrapper<>();
        PageInfo page = PageUtil.getPageInfo(pageNo, PageUtil.pageSize);
        return workTaskService.get(page, query);
    }

    @GetMapping(value = "/list1")
    public List<WorkTaskEntity> list1(Long pageNo) {
        LambdaQueryWrapper<WorkTaskEntity> query = new LambdaQueryWrapper<>();
        return workTaskService.get(query);
    }
}
